package groupe;

import java.util.ArrayList;
import java.util.List;

public class Z3Z extends FiniteGroup implements AbelianGroup {

    public static List<Z3Z> elements;
    private int Val;

    public Z3Z() {
      
        elements = new ArrayList<Z3Z>(3);
        for (int i = 0 ; i < 3; i++) {
            elements.add(new Z3Z(i));
        }
    }

    public Z3Z(int i) {
        Val = i;
    }

    public Z3Z lci(Z3Z z) {//~multi modulo 3
        return new Z3Z((Val*z.Val) % 3 );
    }

    public int val() {
        return Val;
    }

    @Override
    public String toString() {
        super.toString();
        return String.valueOf(Val);
    }
}
